import request from '@/utils/request'

// 获取列表
export function orderGetList(pd) {
  return request({
    url: '/wms/order/getList',
    method: 'get',
    params: pd
  })
}

// 获取条数
export function orderGetCount(pd) {
  return request({
    url: '/wms/order/getCount',
    method: 'get',
    params: pd
  })
}

// 新增
export function orderAdd(data) {
  return request({
    url: '/wms/order',
    method: 'post',
    data: data
  })
}

// 修改
export function orderEdit(pd) {
  return request({
    url: '/wms/order',
    method: 'put',
    data: pd
  })
}

// 删除参数配置
export function orderDel(id) {
  return request({
    url: '/wms/order/id/' + id,
    method: 'delete'
  })
}
//============子表数据增删改查=====================

/** 获取子表列表*/
export function orderGetLineList(pd) {
  return request({
    url: '/wms/order/getLineList',
    method: 'get',
    params: pd
  })
}

// 获取条数
export function orderGetLineCount(pd) {
  return request({
    url: '/wms/order/getLineCount',
    method: 'get',
    params: pd
  })
}

// 新增
export function orderAddLine(data) {
  return request({
    url: '/wms/order/line',
    method: 'post',
    data: data
  })
}

// 修改
export function orderEditLine(pd) {
  return request({
    url: '/wms/order/line',
    method: 'put',
    data: pd
  })
}

// 删除参数配置
export function orderDelLine(lineId) {
  return request({
    url: '/wms/order/lineId/' + lineId,
    method: 'delete'
  })
}


//============子表数据增删改查=====================

/** 获取子表列表*/
export function orderGetTypeList(pd) {
  return request({
    url: '/wms/order/getTypeList',
    method: 'get',
    params: pd
  })
}

// 获取条数
export function orderGetTypeCount(pd) {
  return request({
    url: '/wms/order/getTypeCount',
    method: 'get',
    params: pd
  })
}

// 新增
export function orderAddType(data) {
  return request({
    url: '/wms/order/type',
    method: 'post',
    data: data
  })
}

// 修改
export function orderEditType(pd) {
  return request({
    url: '/wms/order/type',
    method: 'put',
    data: pd
  })
}

// 删除参数配置
export function orderDelType(typeId) {
  return request({
    url: '/wms/order/typeId/' + typeId,
    method: 'delete'
  })
}
